<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
	request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

	<head>
		<base href="<%=basePath%>"></base>
		<title>${sessionScope.topicName} -关键词列表</title>
		<link rel="stylesheet" type="text/css" href="css/mainPageStyle.css"/>
		<link rel="stylesheet" href="css/pagination.css" />
		<link rel="stylesheet" href="css/subPage.css" />
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/jquery.pagination.js"></script>
        <%@include file="../im.jsp" %>
    </head>


	<body>
    <logic:notEmpty name="user">

        <div id="content" class="container">
            <%@include file="../top.jsp"%>
            <div class="row">
                <%@include file="../left.jsp"%>


                <div class="col-md-10" style="padding: 15px">
                    <div>
                        <logic:present name="result" scope="request">
                            <h3>已监控如下关键字：</h3>
                            <table class="table table-hover">

                                <logic:iterate id="record" name="result" >

                                    <tr valign="top" >
                                        <td valign="top" style="font-size:14px;padding-top:5px;">
                                            <bean:write name="record" property="keyword"/></td>
                                        <td>
                                            <bean:write name="record" property="importance"/>&nbsp;&nbsp;&nbsp;
                                        </td>

                                        <td>
                                            <bean:write name="record" property="category"/>&nbsp;&nbsp;&nbsp;
                                        </td>
                                        <td>
                                            <html:link page="/keywordAction.do?method=edit" paramId="id" paramName="record" paramProperty="id">编辑</html:link>
                                        </td>
                                        <td>
                                            <html:link page="/keywordAction.do?method=delete" paramId="id" paramName="record" paramProperty="id">删除</html:link>
                                        </td>
                                        <td>
                                            <html:link page="/searchAction.do?method=search" paramId="keyword" paramName="record" paramProperty="keyword">相关新闻</html:link>
                                        </td>
                                    </tr>

                                </logic:iterate>
                            </table>
                        </logic:present>
                        <html:link page="/site/addkeyword.jsp">添加新关键词</html:link>
                    </div>
                </div>
            </div>

        </div>
    </logic:notEmpty>
    <logic:empty name="user">
        Access Rejected! Error 404
    </logic:empty>
	</body>
</html>

